<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<link href="css/pagination.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>资金结算报表</title>
<style>
.title {
	display: block;
	background: #5a98de;
	line-height: 31px;
	float: left;
	color: white;
	width: 95px;
	text-align: center;
}

.title:hover {
	text-decoration: none;
	color: white;
}
</style>
</head>

<body>
	<nav class="breadcrumb">
		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height:1.6em;margin-top:3px" onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>
	</nav>
	
	<div class="pd-20">
		<div class="cl pd-5 bg-1 bk-gray"> 
			<a id="one" style="" class="title">当天</a>
			<a id="two" style="" class="title">昨天</a>
		 	<a id="three" style="border-top-right-radius:5px;border-bottom-right-radius:5px;" class="title">日期查找</a>
		 </div>
		
		<div id="search" class="cl pd-5 bg-1 bk-gray" style="margin-top:20px; 
		<c:if test="${status!=3}">display: none</c:if>"> 
		  <form action="<%=path%>/backstage/t_shipper_cash_list" method="get"
				class="form form-horizontal" id="form-list_byterm">
				<div class="text-c">
				<input type="hidden" value="${status}" name="status" id="status">
				<div class="row cl">
					<label class="form-label col-1">日期：</label>
					<div class="formControls col-2">
					<input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax2\')}'})" id="datemin2" value="${date1}" name="date1" class="input-text Wdate">
					</div>
					<div class="formControls col-2">
					<input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin2\')}'})" id="datemax2" value="${date2}" name="date2" class="input-text Wdate">
					</div>
				</div>	
					<div class="row cl">
					<button name="" id="" class="btn btn-success" style="border-radius:5px;float:right;" type="submit">
						 查询
					</button>
					</div>
				</div>
			</form>
		 </div>

		<div class="mt-20">
			<table style="width:2000px;"
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						
                        <th width="100">ID</th>
                        <th width="100">结算日期</th>
                        <th width="100">配送员账号</th>
                        <th width="100">配送员名字</th>
                        <th width="100">订单数</th>
						<th width="100">货到付款金额</th>
						<th width="100">商户现结金额</th>
						<th width="100">结算差异</th>
						<th width="100">结算</th>
						<th width="100">当前备用金余额</th>
						<th width="100">合计总额</th>
						<th width="100">应上交金额</th>
                        <th width="100">备注</th>
						<th width="200">操作</th>
					</tr>
				</thead>
				<tbody>
						<c:forEach items="${shippers}" var="shipper">
						
						<tr class="text-c">
                            <td>${shipper.id}</td>
                            <c:if test="${shipper.balance_date!=null}">
                            <td>${shipper.balance_date}</td>
                            </c:if>
                            <c:if test="${shipper.balance_date==null}">
                            <td>---</td>
                            </c:if>
                            <td>${shipper.user_id}</td>
                            <td>${shipper.c_tname}</td>
                            <td>${shipper.shipping_num}</td>
                            <c:if test="${shipper.on_delivery_money>0}">
                            <td>+${shipper.on_delivery_money}</td>
                            </c:if>
                            <c:if test="${shipper.on_delivery_money==0}">
                            <td>---</td>
                            </c:if>
                            <c:if test="${shipper.cash_term_money>0}">
                            <td>-${shipper.cash_term_money}</td>
                            </c:if>
                            <c:if test="${shipper.cash_term_money==0}">
                            <td>---</td>
                            </c:if>
                            <td>${shipper.cash_different}</td>
                            <td>${shipper.cash_money}</td>
                            <td>${shipper.reserve_money}</td>
                            <td>${shipper.all_money}</td>
                            <c:if test="${shipper.give_money>0}">
                            <td>${shipper.give_money}</td>
                            </c:if>
                            <c:if test="${shipper.give_money<=0}">
                            <td>---</td>
                            </c:if>
                           	<c:if test="${shipper.reserve_money>200}">
                           	<td>上交站长</td>
                           	</c:if>
                            <c:if test="${shipper.reserve_money<200}">
                            <td>备用金充值</td>
                           	</c:if>
                           	<c:if test="${shipper.reserve_money==200}">
                           	<td>---</td>
                           	</c:if>
                            
							<td class="td-manage">
								<a style="text-decoration:none"
								onClick="t_shipping_edit(this,'${t_shipping.rid}')" href="javascript:void(0);"
								title="详情">详情</a>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<%-- <c:if test="${shipper.reserve_money>200}">
                            	<a style="text-decoration:none"
								onClick="t_shipping_allocate(this,'${t_shipping.shipping_id}','${t_shipping.titles}')" href="javascript:void(0);"
								title="上交">上交</a>
                            	</c:if>
                            	<c:if test="${shipper.reserve_money<200}">
                            	<a style="text-decoration:none"
								onClick="Shippers_change_pd(this,'${t_shipping.shipping_id}','${t_shipping.titles}')" href="javascript:void(0);"
								title="充值">充值</a>
                            	</c:if> --%>
								
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div id="Pagination" class="page-con"></div>
		</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript">
	$(function() {
		initPager();
	});
	
	var showCount = ${pageInfo.showCount};
	var currentPage = ${pageInfo.currentPage-1};
	var totalResult = ${pageInfo.totalResult};
	function initPager(){
		$("#Pagination").pagination(totalResult, {
            callback: function(new_page_index, pagination_container){
            	var oldLocation = location.href;
            	var pa = "currentPage=" + (new_page_index+1);
        		var shoC = "showCount=" + showCount;
            	var index = oldLocation.lastIndexOf("?");
            	if (index == -1){
            		location.href = oldLocation + "?" + pa + "&" + shoC;
            	}else if (oldLocation.indexOf("currentPage") == -1){
            		location.href = oldLocation + "&" + pa;
            	}else if (oldLocation.indexOf("showCount") == -1){
            		location.href = oldLocation + "&" + shoC;
            	}else{
            		var temp = oldLocation.replace(/currentPage=\d+/, pa);
					var newLocation = temp.replace(/showCount=\d+/, shoC);
            		location.href = newLocation;
            	}
            	return false;
            },
            items_per_page:showCount, 
            load_first_page:false,
            prev_text:'上一页',
            next_text:'下一页',
            ellipse_text:'...',
            num_edge_entries:1,
            num_display_entries:5,
            current_page:currentPage,
        });
	}
		
		/*重置*/
		function type_reset(url){
			window.location = url;
		}
		
		/*详情*/
		function t_shipping_edit(obj,id,w,h){
			var edit_page = "<%=path%>/backstage/order-details?rid="+id;
			layer_show("详情",edit_page,w,h);
		}

		/*立即派单*/
		function t_shipping_allocate(obj,id,title,w,h){
			var edit_page = "<%=path%>/backstage/Shippers_pd?shipping_id="+id+"&titles="+title+"&thetype=1";
			layer_show("立即派单",edit_page,w,h);
		}
		
		/*更改派单*/
		function Shippers_change_pd(obj,id,title,w,h){
			var edit_page = "<%=path%>/backstage/Shippers_change_pd?shipping_id="+id+"&titles="+title+"&thetype=1";
			layer_show("更改派单",edit_page,w,h);
		}
		
		
		
		if($("#status").val()==1){
			$("#one").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		}else if($("#status").val()==2){
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		}else{
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"#5a98de","border":"1px solid #5a98de"});
		}
		//选择状态
		$("#one").click(function(){
			$("#status").val(1);
			$("#form-list_byterm").submit();
			$("#one").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		});
		//选择状态
		$("#two").click(function(){
			$("#status").val(2);
			$("#form-list_byterm").submit();
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		});
		//选择状态
		$("#three").click(function(){
			$("#status").val(3);
			$("#form-list_byterm").submit();
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"#5a98de","border":"1px solid #5a98de"});
		});
	</script>
</body>
</html>



